<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$category.name} {$category.page_title} {$site_info.site_name|default=''}</title>
<meta name="keywords" content="{$category.page_keywords},{$site_info.site_seo_keywords|default=''}"/>
<meta name="description" content="{$category.page_description},{$site_info.site_seo_description|default=''}">
<include file="public@head"/>


</head>
<body>
    
    <include file='public@nav' />
    
    <include file='public@banner' />

    <div class="main layout clearfix">

        <include file='public@category' />

        <div class="oright fr">
            <include file='public@breadcrumb' />

            <div class="content">
                <div class="qlist">
                    <div class='down clearfix'>
                        <php>
                            $order = SO;
                        </php>
                        <portal:articles item="vo" order="$order" page="6" field="post_title,post.more,published_time"
                                         relation="categories"
                                         categoryIds="$category.id"
                                         returnVarName="articles_data">
                            <php>
                                /*获取附件第一个文件*/
                                $file_url = empty($vo['more']['files'][0]['url']) ? '' : $vo['more']['files'][0]['url'];
                                if( $file_url ){
                                    /*查询资源库，获得文件大小*/
                                    $where = [
                                        'filename'  => $vo['more']['files'][0]['name'],
                                        'file_path' => $file_url,
                                    ];
                                    $file_size = db('asset')->where($where)->value('file_size');
                                    $file_size = format_bytes($file_size);
                                }
                            </php>

                        <div class="m_list clearfix">
                            <div class="date"><span class="c1">{$vo.published_time|date='d',###}</span><span class="c2">{$vo.published_time|date='y-m',###}</span></div>
                            <div class="con">{$vo.post_title}</div>
                            <notempty name="file_url">
                                <div class="btn"><a id="download" href="{:cmf_get_image_url($file_url)}" target="_blank">下载附件</a></div>
                            <else>
                                <div class="btn"><a id="download" onclick="update()">下载附件</a></div>
                            </notempty>

                            <div class="clear"></div>
                        </div>
                        </portal:articles>

                    </div>
                    <div class="pages">
                        <page/>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <include file='public@footer'/>
</body>
</html>

<include file='public@scripts'/>
